<template>
    我是options API
</template>
<script>
 import {onMounted} from 'vue'
export default{
    props:{

    },
    data(){
        return {
            name: 'bal'
        }
    },

    methods:{
        myMethodFun (){
            console.log('myMethodFun');
        }
    },
    mounted() {
        console.log('mounted',this.name);
    },
    beforeCreate() {
        console.log('beforeCreate',this.name);
    },
    created() {
        console.log('created',this.name);
    },
    setup(props) {
        console.log('setup this',onMounted);
        onMounted(() => {
            console.log('onMounted');
        })
    },

}
</script>